home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / entrez / client / netlib.h < prev    next >
Text File  |  1996-07-05  |  5KB  |  127 lines

  1. /*   netlib.h
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE                          
  5. *               National Center for Biotechnology Information
  6. *                                                                          
  7. *  This software/database is a "United States Government Work" under the   
  8. *  terms of the United States Copyright Act.  It was written as part of    
  9. *  the author's official duties as a United States Government employee and 
  10. *  thus cannot be copyrighted.  This software/database is freely available 
  11. *  to the public for use. The National Library of Medicine and the U.S.    
  12. *  Government have not placed any restriction on its use or reproduction.  
  13. *                                                                          
  14. *  Although all reasonable efforts have been taken to ensure the accuracy  
  15. *  and reliability of the software and data, the NLM and the U.S.          
  16. *  Government do not and cannot warrant the performance or results that    
  17. *  may be obtained by using this software or data. The NLM and the U.S.    
  18. *  Government disclaim all warranties, express or implied, including       
  19. *  warranties of performance, merchantability or fitness for any particular
  20. *  purpose.                                                                
  21. *                                                                          
  22. *  Please cite the author in any work or product based on this material.   
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:  netlib.h
  27. *
  28. * Author:  Epstein
  29. *
  30. * Version Creation Date:   06/05/92
  31. *
  32. * $Revision: 4.0 $
  33. *
  34. * File Description: 
  35. *       header file for miscellaneous library for Network Entrez
  36. *
  37. * Modifications:  
  38. * --------------------------------------------------------------------------
  39. * Date     Name        Description of modification
  40. * -------  ----------  -----------------------------------------------------
  41. *
  42. * ==========================================================================
  43. *
  44. *
  45. * RCS Modification History:
  46. * $Log: netlib.h,v $
  47.  * Revision 4.0  1995/07/26  13:54:59  ostell
  48.  * force revision to 4.0
  49.  *
  50.  * Revision 1.3  1995/05/17  17:53:22  epstein
  51.  * add RCS log revision history
  52.  *
  53. */
  54.  
  55. #ifndef _NETLIB_
  56. #define _NETLIB_
  57.  
  58. #ifndef _NCBI_Access_
  59. #include <objacces.h>
  60. #endif
  61.  
  62. #ifndef _NETENTREZ_
  63. #include <netentr.h>
  64. #endif
  65. #include <cdconfig.h>
  66.  
  67. /* --- Macros --- */
  68. #define LOG_STAT(subsys,label,dat) { static NetStatPtr _p = NULL; LogNetStats(subsys, label, (Int4) (dat), &_p, 0); }
  69. #define LOG_STAT_M(subsys,label,dat) { static NetStatPtr _p = NULL; LogNetStats(subsys, label, (Int4) (dat), &_p, STAT_MEAN); }
  70. #define LOG_STAT_S(subsys,label,dat) { static NetStatPtr _p = NULL; LogNetStats(subsys, label, (Int4) (dat), &_p, STAT_MEAN | STAT_STDEV); }
  71.  
  72. /* Subsystems for statistics management */
  73. #define SUBSYS_SRV_ENTREZ    1
  74. #define SUBSYS_SRV_ML        2
  75. #define SUBSYS_SRV_SEQ       3
  76.  
  77. #define SUBSYS_CLI_ENTREZ    4
  78. #define SUBSYS_CLI_ML        5
  79. #define SUBSYS_CLI_SEQ       6
  80.  
  81. #define STAT_MEAN            1
  82. #define STAT_STDEV           2
  83.  
  84. typedef struct NetStat {
  85.     Int2 subsys;
  86.     CharPtr label;
  87.     double total;
  88.     double sum_of_squares;
  89.     Int4 n;
  90.     Int2 flags;
  91. } NetStat, PNTR NetStatPtr;
  92.  
  93. typedef void (* StatsCallBack) PROTO((CharPtr s));
  94.  
  95.  
  96. /* --- Function Prototypes --- */
  97.  
  98. Boolean CDECL NetInitialize PROTO((CharPtr,CharPtr,Int2Ptr));
  99. Boolean CDECL NetInit        PROTO((void));
  100. Boolean CDECL NetFini       PROTO((void));
  101.  
  102. Boolean CDECL ForceNetInit PROTO((void));
  103.  
  104. EntrezInfoPtr NetGetInfo PROTO((void));
  105.  
  106. Int2 CDECL NetLinkUidGet PROTO((LinkSetPtr PNTR result, DocType type,
  107. DocType link_to_type, Int2 numuid, DocUidPtr uids, Boolean mark_missing,
  108. Int4 maxlink));
  109.  
  110. TermRespPtr CDECL TermRespNew PROTO((void));
  111. TermRespPtr CDECL TermRespFree PROTO((TermRespPtr p));
  112. TermRespPtr CDECL TermRespAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  113.  
  114. ValNodePtr CDECL BoolExprAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  115. Boolean CDECL BoolExprAsnWrite PROTO((ValNodePtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  116. void CDECL LogNetStats PROTO((Int2 subsys, CharPtr label, Int4 dat, NetStatPtr PNTR statHandle, Int2 flags));
  117. void CDECL DumpNetStats PROTO((Int2 subsys, StatsCallBack callBack));
  118. void CDECL GetClientInfo PROTO((CharPtr buf));
  119.  
  120. /* The following mechanism must be re-worked after the ASN.1 tools are    */
  121. /* modified to allow multiple includes and loads of the same include file */
  122. #if defined(OS_MAC) || defined(OS_DOS)  /* dynamic load */
  123. #define NET_ENTR_DYNAMIC_LOAD 1
  124. #endif
  125.  
  126. #endif
  127.